﻿<UserControl x:Class="TwitterThisWidget.TwitterThisView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006">
    <UserControl.Resources>
        <ImageSource x:Key="twitterBackground">Resources\TwitterBackground.png</ImageSource>
        <ImageSource x:Key="twitterLabel">Resources\TwitterLabel.png</ImageSource>
        <Storyboard x:Key="Click">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleX)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.8"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(Grid.RenderTransform).(ScaleTransform.ScaleY)">
                <SplineDoubleKeyFrame KeyTime="00:00:00.1000000" Value="0.8"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.2000000" Value="1"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Grid RenderTransformOrigin="0.5,0.5" MouseEnter="Grid_MouseEnter" MouseLeave="Grid_MouseLeave" Cursor="Hand">
        <Grid.RenderTransform>
            <ScaleTransform ScaleX="1" ScaleY="1" />
        </Grid.RenderTransform>
        <Grid.Triggers>
            <EventTrigger RoutedEvent="Grid.MouseDown" >
                <BeginStoryboard Storyboard="{StaticResource ResourceKey=Click}" />
            </EventTrigger>
        </Grid.Triggers>
        <Image Source="{StaticResource twitterBackground}" Height="87" />
        <Image Source="{StaticResource twitterLabel}" Height="50" />
    </Grid>
</UserControl>
